import { axios } from '@/utils/request'
export function getEnterprisePage(parameter) {
  parameter.pageNum = parameter.current;
  parameter.pageSize = parameter.size;
  return axios({
    url: '/sys/hr/enterprise/pageQueryEnterprise',
    method: 'post',
    data: parameter
  })
}
export function getEnterpriseInfo(parameter) {
  return axios({
    url: '/sys/hr/enterprise/detail',
    method: 'post',
    data: parameter
  })
}
export function getEnterpriseExport(parameter) {
  return axios({
    url: '/sys/hr/enterprise/exportEnterprise',
    method: 'post',
    data: parameter,
    responseType: 'blob'
  })
}
export function enterprisePublicSet(parameter) {
  return axios({
    url: '/sys/hr/enterprise/enterprisePublicSet',
    method: 'post',
    data:parameter
  })
}
export function enterpriseLoginAccountStatusSet(parameter) {
  return axios({
    url: '/sys/hr/enterprise/enterpriseLoginAccountStatusSet',
    method: 'post',
    data:parameter
  })
}
export function enterpriseCooperateStatusSet(parameter) {
  return axios({
    url: '/sys/hr/enterprise/enterpriseCooperateStatusSet',
    method: 'post',
    data:parameter
  })
}
export function updatePublic(parameter) {
  return axios({
    url: '/sys/hr/enterprise/updatePublic',
    method: 'post',
    data:parameter
  })
}
export function listEnterpriseBizType() {
  return axios({
    url: '/sys/hr/enterpriseFee/listEnterpriseBizType',
    method: 'get'
  })
}

export function addEnterprise(parameter) {
  return axios({
    url: '/sys/hr/enterprise/add',
    method: 'post',
    data:parameter
  })
}
export function editEnterprise(parameter) {
  return axios({
    url: '/sys/hr/enterprise/update',
    method: 'post',
    data:parameter
  })
}
export function enterpriseFeeInfo(id) {
  return axios({
    url: '/sys/hr/enterpriseFee/listByEnterpriseId/' + id,
    method: 'get'
  })
}
export function costEnterprise(parameter) {
  return axios({
    url: '/sys/hr/enterpriseFee/editEnterpriseFee',
    method: 'post',
    data:parameter
  })
}
export function delEnterprise(parameter) {
  return axios({
    url: '/sys/hr/enterprise/delete',
    method: 'post',
    data:parameter
  })
}
export function enterprisePublic(id) {
  return axios({
    url: `/sys/hr/enterprise/public/${id}`,
    method: 'get'
  })
}

// 开户接口配置
export function pageQueryEnterpriseBankAccount(parameter) {
  return axios({
    url: '/sys/hr/admin/bank/pageQueryEnterpriseBankAccount',
    method: 'post',
    data:parameter
  })
}
export function pageQueryParkBankAccount(parameter) {
  return axios({
    url: '/sys/hr/admin/bank/pageQueryParkBankAccount',
    method: 'post',
    data:parameter
  })
}
export function selectAccountList(parameter) {
  return axios({
    url: '/sys/hr/admin/bank/selectAccountList',
    method: 'post',
    data:parameter
  })
}
export function selectBalance(parameter) {
  return axios({
    url: '/sys/hr/admin/bank/selectBalance',
    method: 'post',
    data:parameter
  })
}
export function addEnterpriseBankAccount(parameter) {
  return axios({
    url: '/sys/hr/admin/bank/addEnterpriseBankAccount',
    method: 'post',
    data:parameter
  })
}
export function addParkBankAccount(parameter) {
  return axios({
    url: '/sys/hr/admin/bank/addParkBankAccount',
    method: 'post',
    data:parameter
  })
}
export function closeEnterpriseBankAccount(parameter) {
  return axios({
    url: '/sys/hr/admin/bank/closeEnterpriseBankAccount',
    method: 'post',
    data:parameter
  })
}

// 方案配置企业选择
export function caseQueryCaseRelation(caseId) {
  return axios({
    url: `/sys/hr/insure/case/queryCaseRelation/${caseId}`,
    method: 'get'
  })
}
export function caseOperateCaseRela(parameter) {
  return axios({
    url: '/sys/hr/insure/case/operateCaseRela',
    method: 'post',
    data:parameter
  })
}